package com.specialized.pay.payobserver;

import com.specialized.passenger.domain.User;
import com.specialized.pay.mapper.RealTimeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @Author：wangxinyu
 * @Package：com.specialized.pay.payobserver
 * @Project：Specialized-Cloud
 * @name：PayListener
 * @Date：2024/8/4 15:57
 */
@Component
public class PayListener {
    @Autowired
    private RealTimeMapper realTimeMapper;
    @Async
    @EventListener(User.class)
    public  void  couponListener(User user ){
        realTimeMapper.updUserSource(user);
    }





}
